/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package pe.edu.unmsm.cinfo.siga.datos;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author alumno
 */
@Entity
@Table(name = "ACTA")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Acta.findAll", query = "SELECT a FROM Acta a"),
    @NamedQuery(name = "Acta.findByActaCod", query = "SELECT a FROM Acta a WHERE a.actaCod = :actaCod"),
    @NamedQuery(name = "Acta.findByActaApro", query = "SELECT a FROM Acta a WHERE a.actaApro = :actaApro"),
    @NamedQuery(name = "Acta.findByActaDesa", query = "SELECT a FROM Acta a WHERE a.actaDesa = :actaDesa"),
    @NamedQuery(name = "Acta.findByActaFape", query = "SELECT a FROM Acta a WHERE a.actaFape = :actaFape"),
    @NamedQuery(name = "Acta.findByActaFcie", query = "SELECT a FROM Acta a WHERE a.actaFcie = :actaFcie"),
    @NamedQuery(name = "Acta.findByActaEst", query = "SELECT a FROM Acta a WHERE a.actaEst = :actaEst"),
    @NamedQuery(name = "Acta.findByActaRect", query = "SELECT a FROM Acta a WHERE a.actaRect = :actaRect")})
public class Acta implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "ACTA_COD")
    private Integer actaCod;
    @Column(name = "ACTA_APRO")
    private Integer actaApro;
    @Column(name = "ACTA_DESA")
    private Integer actaDesa;
    @Basic(optional = false)
    @Column(name = "ACTA_FAPE")
    @Temporal(TemporalType.DATE)
    private Date actaFape;
    @Column(name = "ACTA_FCIE")
    @Temporal(TemporalType.DATE)
    private Date actaFcie;
    @Basic(optional = false)
    @Column(name = "ACTA_EST")
    private short actaEst;
    @Column(name = "ACTA_RECT")
    private Integer actaRect;
    @JoinColumn(name = "MODG_COD", referencedColumnName = "MODG_COD")
    @ManyToOne(optional = false, fetch = FetchType.LAZY)
    private ModuloGrupo modgCod;

    public Acta() {
    }

    public Acta(Integer actaCod) {
        this.actaCod = actaCod;
    }

    public Acta(Integer actaCod, Date actaFape, short actaEst) {
        this.actaCod = actaCod;
        this.actaFape = actaFape;
        this.actaEst = actaEst;
    }

    public Integer getActaCod() {
        return actaCod;
    }

    public void setActaCod(Integer actaCod) {
        this.actaCod = actaCod;
    }

    public Integer getActaApro() {
        return actaApro;
    }

    public void setActaApro(Integer actaApro) {
        this.actaApro = actaApro;
    }

    public Integer getActaDesa() {
        return actaDesa;
    }

    public void setActaDesa(Integer actaDesa) {
        this.actaDesa = actaDesa;
    }

    public Date getActaFape() {
        return actaFape;
    }

    public void setActaFape(Date actaFape) {
        this.actaFape = actaFape;
    }

    public Date getActaFcie() {
        return actaFcie;
    }

    public void setActaFcie(Date actaFcie) {
        this.actaFcie = actaFcie;
    }

    public short getActaEst() {
        return actaEst;
    }

    public void setActaEst(short actaEst) {
        this.actaEst = actaEst;
    }

    public Integer getActaRect() {
        return actaRect;
    }

    public void setActaRect(Integer actaRect) {
        this.actaRect = actaRect;
    }

    public ModuloGrupo getModgCod() {
        return modgCod;
    }

    public void setModgCod(ModuloGrupo modgCod) {
        this.modgCod = modgCod;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (actaCod != null ? actaCod.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Acta)) {
            return false;
        }
        Acta other = (Acta) object;
        if ((this.actaCod == null && other.actaCod != null) || (this.actaCod != null && !this.actaCod.equals(other.actaCod))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "pe.edu.unmsm.cinfo.siga.datos.Acta[ actaCod=" + actaCod + " ]";
    }
    
}
